﻿#include "commonreq.h"



CommonReq::CommonReq() : BaseMsg(MSG_TYPE_COMMON_REQ)
{
}

CommonReq::~CommonReq()
{

}

int CommonReq::decodeParametersFromTlv(TLV *tlv)
{

    if(tlv->tag == CommonReqTag_type)
    {
        this->type = tlv->getIntValue();
    }
    return f_success;
}

int CommonReq::encodeParametersIntoTlvs(list<TLV *> &tlvs)
{

    tlvs.push_back(createTlvByIntValue(CommonReqTag_type, this->type));

    return f_success;
}
